package jiwei.service.xml;

import jiwei.dao.UserDao;
import jiwei.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    UserDao dao; //注入dao

    public void add(User user) {
        dao.add(user);
    }

    public void add_transacton() {
        dao.add(new User("12"));
        dao.add(new User("123"));
    }

    @Autowired
    UserService_protected userService_protected;

    public void add_protected() {
        userService_protected.add_transacton();
    }
}
